<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">


    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>

</head>
<body>
<h3 class="text-center">欢迎登录</h3>
<form class="form-horizontal" th:action="@{/doLogin}" method="post">
    <p style="color: red" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
    <div class="form-group ">
        <label for="username" class="col-sm-2 control-label">用户名</label>
        <div class="col-sm-2">
            <input type="text" class="form-control" name="loginName" id="username" placeholder="用户名">
        </div>
    </div>
    <div class="form-group ">
        <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
        <div class="col-sm-2">
            <input type="password" class="form-control" name="loginPassword" id="inputPassword3" placeholder="密码">
        </div>
    </div>
    <div class="form-group ">
        <div class="col-sm-offset-2 col-sm-2">
            <button type="submit" class="btn btn-sm btn-success">登录</button>
            <button type="submit" class="btn btn-sm btn-primary">注册</button>
        </div>
    </div>
</form>


<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
</body>
</html>